package com.sg.controller.bff;

import com.sg.service.biz.bff.CycleTypeService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "CycleType", tags = {"CycleType"})
@RestController
// @RequestMapping("/oms/cycleType/")
public class CycleTypeController {

    @Autowired
    CycleTypeService cycleTypeService;


    /**
     * B3-4查询周期类型实例列表(边界)
     * gen by moon at 8/10/2022, 3:38:22 AM
     */
    @PostMapping("/oms/cycleType/queryCycleTypeInstanceListBorder")
    @ApiOperation(value = "B3-4查询周期类型实例列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryCycleTypeInstanceListBorderRespDto> queryCycleTypeInstanceListBorder(@RequestBody(required = false) @Validated BffQueryCycleTypeInstanceListBorderReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryCycleTypeInstanceListBorder(reqDTO));
    }

    /**
     * B3-4查询周期类型列表(边界)
     * gen by moon at 10/11/2022, 6:09:21 PM
     */
    @PostMapping("/oms/cycleType/queryCycleTypeListBorder")
    @ApiOperation(value = "B3-4查询周期类型列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryCycleTypeListBorderRespDto> queryCycleTypeListBorder(@RequestBody(required = false) @Validated BffQueryCycleTypeListBorderReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryCycleTypeListBorder(reqDTO));
    }

    /**
     * B3-4查周期列表(边界)
     * gen by moon at 9/13/2022, 3:43:39 AM
     */
    @PostMapping("/oms/cycleType/queryCycleListBorder")
    @ApiOperation(value = "B3-4查周期列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryCycleListBorderRespDto> queryCycleListBorder(@RequestBody(required = false) @Validated BffQueryCycleListBorderReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryCycleListBorder(reqDTO));
    }

    /**
     * B3-4查父周期列表(边界)
     * gen by moon at 10/12/2022, 11:11:23 AM
     */
    @PostMapping("/oms/cycleType/queryFatherCycleListBorder")
    @ApiOperation(value = "B3-4查父周期列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryFatherCycleListBorderRespDto> queryFatherCycleListBorder(@RequestBody(required = false) @Validated BffQueryFatherCycleListBorderReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryFatherCycleListBorder(reqDTO));
    }

    /**
     * B3-4查子周期列表(边界)
     * gen by moon at 10/12/2022, 11:11:24 AM
     */
    @PostMapping("/oms/cycleType/querySubcycleListBorder")
    @ApiOperation(value = "B3-4查子周期列表(边界)", response = OkrResult.class)
    public OkrResult<BffQuerySubcycleListBorderRespDto> querySubcycleListBorder(@RequestBody(required = false) @Validated BffQuerySubcycleListBorderReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.querySubcycleListBorder(reqDTO));
    }

    /**
     * B3-4查中期周期列表(边界)
     * gen by moon at 10/2/2022, 11:27:47 PM
     */
    @PostMapping("/oms/cycleType/queryMidCycleListBorder")
    @ApiOperation(value = "B3-4查中期周期列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryMidCycleListBorderRespDto> queryMidCycleListBorder(@RequestBody(required = false) @Validated BffQueryMidCycleListBorderReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryMidCycleListBorder(reqDTO));
    }

    /**
     * B3-4查小于年单周期列表(边界)
     * gen by moon at 10/12/2022, 11:11:26 AM
     */
    @PostMapping("/oms/cycleType/queryLessYearSingleCycleListBorder")
    @ApiOperation(value = "B3-4查小于年单周期列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryLessYearSingleCycleListBorderRespDto> queryLessYearSingleCycleListBorder(@RequestBody(required = false) @Validated BffQueryLessYearSingleCycleListBorderReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryLessYearSingleCycleListBorder(reqDTO));
    }

    /**
     * B3-4查询父子中周期列表(边界)
     * gen by moon at 10/11/2022, 2:03:33 PM
     */
    @PostMapping("/oms/cycleType/queryParentSonMidCycleListBorder")
    @ApiOperation(value = "B3-4查询父子中周期列表(边界)", response = OkrResult.class)
    public OkrResult<BffQueryParentSonMidCycleListBorderRespDto> queryParentSonMidCycleListBorder(@RequestBody(required = false) @Validated BffQueryParentSonMidCycleListBorderReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryParentSonMidCycleListBorder(reqDTO));
    }

    /**
     * B3-4查询中期周期详情(边界)
     * gen by moon at 10/12/2022, 11:11:34 AM
     */
    @PostMapping("/oms/cycleType/queryMidCycleDetailBorder")
    @ApiOperation(value = "B3-4查询中期周期详情(边界)", response = OkrResult.class)
    public OkrResult<BffQueryMidCycleDetailBorderRespDto> queryMidCycleDetailBorder(@RequestBody(required = false) @Validated BffQueryMidCycleDetailBorderReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryMidCycleDetailBorder(reqDTO));
    }

    /**
     * B3批量查询租户周期列表(管理)
     * gen by moon at 11/26/2022, 3:47:39 PM
     */
    @PostMapping("/oms/mgt/cycleType/batchQueryTenantCycle")
    @ApiOperation(value = "B3批量查询租户周期列表(管理)", response = OkrResult.class)
    public OkrResult<BffBatchQueryTenantCycleRespDto> batchQueryTenantCycle(@RequestBody(required = false) @Validated BffBatchQueryTenantCycleReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.batchQueryTenantCycle(reqDTO));
    }

    /**
     * B3删除租户周期(管理)
     * gen by moon at 11/26/2022, 6:26:17 PM
     */
    @PostMapping("/oms/mgt/cycleType/deleteTenantCycle")
    @ApiOperation(value = "B3删除租户周期(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteTenantCycleRespDto> deleteTenantCycle(@RequestBody(required = false) @Validated BffDeleteTenantCycleReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.deleteTenantCycle(reqDTO));
    }

    /**
     * B3批量查询租户周期导航(管理)
     * gen by moon at 11/26/2022, 6:26:18 PM
     */
    @PostMapping("/oms/mgt/cycleType/batchQueryTenantCycleNavigation")
    @ApiOperation(value = "B3批量查询租户周期导航(管理)", response = OkrResult.class)
    public OkrResult<BffBatchQueryTenantCycleNavigationRespDto> batchQueryTenantCycleNavigation(@RequestBody(required = false) @Validated BffBatchQueryTenantCycleNavigationReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.batchQueryTenantCycleNavigation(reqDTO));
    }

    /**
     * B3查询租户节假日设置列表(管理)
     * gen by moon at 11/29/2022, 11:21:30 AM
     */
    @PostMapping("/oms/mgt/cycleType/queryTenantHolidaySetList")
    @ApiOperation(value = "B3查询租户节假日设置列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryTenantHolidaySetListRespDto> queryTenantHolidaySetList(@RequestBody(required = false) @Validated BffQueryTenantHolidaySetListReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryTenantHolidaySetList(reqDTO));
    }

    /**
     * B3查询租户节假日设置详情(管理)
     * gen by moon at 11/29/2022, 11:21:31 AM
     */
    @PostMapping("/oms/mgt/cycleType/queryTenantHolidaySetDetail")
    @ApiOperation(value = "B3查询租户节假日设置详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryTenantHolidaySetDetailRespDto> queryTenantHolidaySetDetail(@RequestBody(required = false) @Validated BffQueryTenantHolidaySetDetailReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryTenantHolidaySetDetail(reqDTO));
    }

    /**
     * B3查询租户节假日菜单列表(管理)
     * gen by moon at 11/29/2022, 11:21:32 AM
     */
    @PostMapping("/oms/mgt/cycleType/queryTenantHolidayMenuList")
    @ApiOperation(value = "B3查询租户节假日菜单列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryTenantHolidayMenuListRespDto> queryTenantHolidayMenuList(@RequestBody(required = false) @Validated BffQueryTenantHolidayMenuListReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryTenantHolidayMenuList(reqDTO));
    }

    /**
     * B3新增租户节假日设置(管理)
     * gen by moon at 11/29/2022, 11:21:33 AM
     */
    @PostMapping("/oms/mgt/cycleType/addTenantHolidaySet")
    @ApiOperation(value = "B3新增租户节假日设置(管理)", response = OkrResult.class)
    public OkrResult<BffAddTenantHolidaySetRespDto> addTenantHolidaySet(@RequestBody(required = false) @Validated BffAddTenantHolidaySetReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.addTenantHolidaySet(reqDTO));
    }

    /**
     * B3修改租户节假日设置(管理)
     * gen by moon at 11/29/2022, 11:21:35 AM
     */
    @PostMapping("/oms/mgt/cycleType/updateTenantHolidaySet")
    @ApiOperation(value = "B3修改租户节假日设置(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateTenantHolidaySetRespDto> updateTenantHolidaySet(@RequestBody(required = false) @Validated BffUpdateTenantHolidaySetReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.updateTenantHolidaySet(reqDTO));
    }

    /**
     * B3删除租户节假日设置(管理)
     * gen by moon at 11/29/2022, 8:06:11 PM
     */
    @PostMapping("/oms/mgt/cycleType/deleteTenantHolidaySet")
    @ApiOperation(value = "B3删除租户节假日设置(管理)", response = OkrResult.class)
    public OkrResult<BffDeleteTenantHolidaySetRespDto> deleteTenantHolidaySet(@RequestBody(required = false) @Validated BffDeleteTenantHolidaySetReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.deleteTenantHolidaySet(reqDTO));
    }

    /**
     * B3存档租户节假日设置(管理)
     * gen by moon at 11/29/2022, 11:21:37 AM
     */
    @PostMapping("/oms/mgt/cycleType/archiveTenantHolidaySet")
    @ApiOperation(value = "B3存档租户节假日设置(管理)", response = OkrResult.class)
    public OkrResult<BffArchiveTenantHolidaySetRespDto> archiveTenantHolidaySet(@RequestBody(required = false) @Validated BffArchiveTenantHolidaySetReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.archiveTenantHolidaySet(reqDTO));
    }

    /**
     * B3查询周期详情(管理)
     * gen by moon at 11/29/2022, 8:06:10 PM
     */
    @PostMapping("/oms/mgt/cycleType/queryCycleDetail")
    @ApiOperation(value = "B3查询周期详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryCycleDetailRespDto> queryCycleDetail(@RequestBody(required = false) @Validated BffQueryCycleDetailReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryCycleDetail(reqDTO));
    }

    /**
     * B3查询租户周期类型实例列表(管理)
     * gen by moon at 11/30/2022, 2:38:46 AM
     */
    @PostMapping("/oms/mgt/cycleType/queryTenantCycleTypeInstanceList")
    @ApiOperation(value = "B3查询租户周期类型实例列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryTenantCycleTypeInstanceListRespDto> queryTenantCycleTypeInstanceList(@RequestBody(required = false) @Validated BffQueryTenantCycleTypeInstanceListReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.queryTenantCycleTypeInstanceList(reqDTO));
    }

    /**
     * B3新增租户周期(管理)
     * gen by moon at 12/5/2022, 5:37:57 PM
     */
    @PostMapping("/oms/mgt/cycleType/addTenantCycle")
    @ApiOperation(value = "B3新增租户周期(管理)", response = OkrResult.class)
    public OkrResult<BffAddTenantCycleRespDto> addTenantCycle(@RequestBody(required = false) @Validated BffAddTenantCycleReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.addTenantCycle(reqDTO));
    }

    /**
     * B3查询租户周期类型列表ByCodes(管理)
     * gen by moon at 2/27/2023, 3:58:16 PM
     */
    @PostMapping("/oms/mgt/cycleType/batchQueryTenantCycleTypeListByCodes")
    @ApiOperation(value = "B3查询租户周期类型列表ByCodes(管理)", response = OkrResult.class)
    public OkrResult<BffBatchQueryTenantCycleTypeListByCodesRespDto> batchQueryTenantCycleTypeListByCodes(@RequestBody(required = false) @Validated BffBatchQueryTenantCycleTypeListByCodesReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.batchQueryTenantCycleTypeListByCodes(reqDTO));
    }

    /**
     * B3修改租户周期(管理)
     * gen by moon at 2/27/2023, 3:58:23 PM
     */
    @PostMapping("/oms/mgt/cycleType/updateTenantCycle")
    @ApiOperation(value = "B3修改租户周期(管理)", response = OkrResult.class)
    public OkrResult<BffUpdateTenantCycleRespDto> updateTenantCycle(@RequestBody(required = false) @Validated BffUpdateTenantCycleReqDto reqDTO) {
        return OkrResult.success(cycleTypeService.updateTenantCycle(reqDTO));
    }


}
